#ifndef SHAPE_H
#define SHAPE_H

#include "Config.h"

class Shape {

	public:

        struct TextureFace {
            DWORD indices[6];
            string texture;
            string material;
            XMVECTOR translation,
                     rotation,
                     scaling;
            
			TextureFace(DWORD d[6], string tex, string mat, XMVECTOR transl, XMVECTOR rotat, XMVECTOR scal) {
                for(int i=0; i<6; i++)
                    indices[i] = d[i];
                texture = tex;
                material = mat;
                translation = transl;
                rotation = rotat;
                scaling = scal;
            }
        };

		struct VERTEX {
			FLOAT X, Y, Z;
			XMVECTOR normal;
			FLOAT U, V;

            VERTEX() {}
            VERTEX(float a, float b, float c, XMVECTOR d, float e, float f) {
                X = a;
                Y = b;
                Z = c;
                normal = d;
                U = e;
                V = f;
            }
		};

		//General information
		int ID;
		string Name;
		XMVECTOR Translation;
		XMVECTOR Scaling;
		XMVECTOR Rotation;

        /*
         * Since geometry data is not changed at runtime in CVE, call these 
         * functions only AFTER all areas have been read in.
         */
		virtual void Translate(XMVECTOR) = 0;
		virtual void Scale(XMVECTOR) = 0;
		virtual void Rotate(XMVECTOR) = 0;

		/*
		 * Position THIS relative to PARAM1.
		 * Iff PARAM2==true, center THIS relative to PARAM1 along the 
         * appropriate axis.
		 */
		void PlaceAbove(Shape*, boolean);
		void PlaceBelow(Shape*, boolean);
		void PlaceRightOf(Shape*, boolean);
		void PlaceLeftOf(Shape*, boolean);
		void PlaceInFrontOf(Shape*, boolean);
		void PlaceBehind(Shape*, boolean);

		/*
         * Get the lowest or highest x, y and z coordinates in the shape, or get
         * center.
         */
		virtual XMVECTOR GetLowest() = 0;
		virtual XMVECTOR GetHighest() = 0;
		virtual XMVECTOR GetCenter() = 0;

	private:

};

#endif